package com.mrd.gtimp.business.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * <p> application name: sample <p> copyright: Copyright@2012 明睿达科技有限公司
 */

/**
 * 业务要求反馈的货柜封条信息
 *
 * @author winaya
 */
@Entity(name = "T_BIZ_CONTAINER")
public class Container implements Cloneable {

    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
    @Column(name = "ID")
    private String id;

    /**
     * 柜号
     */
    @Column(name = "CT_NO")
    private String containerNo;

    /**
     * 封条号
     */
    @Column(name = "SEAL")
    private String seal;

    /**
     * 柜型
     */
    @Column(name = "CT_TYPE")
    private String ct_type;

    /**
     * 尺寸
     */
    @Column(name = "CT_SIZE")
    private String ct_size;

    /**
     * 相关拖车信息
     */
    @ManyToOne
    @JoinColumn(name = "CAR_ID")
    private CarMsg carMsg;

    /**
     * 所属订舱单
     */
    @ManyToOne
    @JoinColumn(name = "BOOKING_ID")
    private Booking booking;

    /**
     * 生成柜号状态
     */
    @Column
    private String state;
    /**
     * 交接单编号
     */
    @Column(name = "REQ_NO")
    private String reqNo;

    /**
     * so号
     */
    @Column(name = "so")
    private String so;

    /**
     * 所属拖车业务ID
     */
    @ManyToOne
    @JoinColumn(name = "TRAIL_ID")
    private Trail trail;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getContainerNo() {
        return containerNo;
    }

    public void setContainerNo(String containerNo) {
        this.containerNo = containerNo;
    }

    public String getSeal() {
        return seal;
    }

    public void setSeal(String seal) {
        this.seal = seal;
    }

    public CarMsg getCarMsg() {
        return carMsg;
    }

    public void setCarMsg(CarMsg carMsg) {
        this.carMsg = carMsg;
    }

    public Booking getBooking() {
        return booking;
    }

    public void setBooking(Booking booking) {
        this.booking = booking;
    }

    public String getCt_type() {
        return ct_type;
    }

    public void setCt_type(String ct_type) {
        this.ct_type = ct_type;
    }

    public String getCt_size() {
        return ct_size;
    }

    public void setCt_size(String ct_size) {
        this.ct_size = ct_size;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getReqNo() {
        return reqNo;
    }

    public void setReqNo(String reqNo) {
        this.reqNo = reqNo;
    }

    public String getSo() {
        return so;
    }

    public void setSo(String so) {
        this.so = so;
    }

    public Trail getTrail() {
        return trail;
    }

    public void setTrail(Trail trail) {
        this.trail = trail;
    }

    @Override
    public Container clone() throws CloneNotSupportedException {
        Container container = null;
        try {
            container = (Container) super.clone();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return container;
    }

}
